insert into REF_Configs(ClientId,[Key],[Value],ActvStatus,[Description])
values(1,'MaxLoginAttempts','3',1,null)
insert into REF_Configs(ClientId,[Key],[Value],ActvStatus,[Description])
values(1,'SystemPwdDuration','12',1,'hours')
insert into REF_Configs(ClientId,[Key],[Value],ActvStatus,[Description])
values(1,'UserPwdDuration','60',1,'day')
insert into REF_Configs(ClientId,[Key],[Value],ActvStatus,[Description])
values(1,'UserPwdExpiredWarningDuration','5',1,'day')
insert into REF_Configs(ClientId,[Key],[Value],ActvStatus,[Description])
values(1,'ActivationPwdDuration','48',1,'hours')
go
insert into [SEC_Permissions]([PermissionId], [PermissionCode], [Description])
values(1,'ManUsr','Manage user')
go

insert into SEC_Roles (RoleId,RoleName,RoleDescription,ActvStatus,RoleCode)
values(1,'System Admin','Full permissions, only for dev',1,'SysAdmin')
insert into SEC_Roles (RoleId,RoleName,RoleDescription,ActvStatus,RoleCode)
values(2,'Talentnet Admin','Admin of talentnet, only for dev',1,'Admin')
insert into SEC_Roles (RoleId,RoleName,RoleDescription,ActvStatus,RoleCode)
values(3,'Consultants','Admin of talentnet, only for dev',1,'Con')
insert into SEC_Roles (RoleId,RoleName,RoleDescription,ActvStatus,RoleCode)
values(4,'Managers','Admin of talentnet, only for dev',1,'Man')
insert into SEC_Roles (RoleId,RoleName,RoleDescription,ActvStatus,RoleCode)
values(5,'Employees','Admin of talentnet, only for dev',1,'Emp')

go
insert into SEC_PermissionsInRole(RoleId,PermissionId)
values(1,null)
go
exec [spa_SEC_CreateUser]            
	 @UserRecId = null,            
	 @LoginName = 'sysadmin',            
	 @ClientId = 1,            
	 @Email = 'admin@yahoo.com',
	 @UserNameFirst = 'Nha',            
	 @UserNameLast ='Doan',
	 @UserPassword ='8A-6C-0E-58-1C-AA-3B-30-6C-57-13-1A-F1-40-70-1A', --hashed password: sysadmin
	 @UserPasswordType = 3,-- 1: default password of import, 2: default password by system (reset password/create user user), 3: user's password
	 @Status = 2,-- 0:inactive, 1: wait for activation,  2: active, 3: locked out
	 @RoleIds = 1, --role id is seperated by ','            
	 @CreatedBy = null